<script lang="ts" setup>
import { useSlots,ref } from "vue";
const props = defineProps({
    iLinearGradien: {
        type: Boolean,
        default: false,
    },
    iBgColor: {
        type: String,
        default: ''
    },
    iPadding:{
        type: String,
        default:""
    }
});

const slots = useSlots();

//布局样式
const styleObject = ref({
    background: props.iBgColor,
    padding: props.iPadding,
})


</script>

<template>
    <van-row :class="{ linear_gradien: iLinearGradien }" :style="styleObject">
        <template v-for="(value, name) in slots" #[name]="scope">
            <slot :name="name" v-bind="scope || {}"></slot>
        </template>
    </van-row>
</template>

<style lang="scss" scoped>
.linear_gradien {
    background: linear-gradient(to left, $color6, $color7);
}
</style>